home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2009 February / PCWFEB09.iso / Software / Linux / SLAX 6.0.8 / slax-6.0.8.iso / slax / base / 006-devel.lzm / usr / include / k3bvcdjob.h < prev    next >
Encoding:
C/C++ Source or Header  |  2008-05-27  |  2.7 KB  |  116 lines

  1. /*
  2. *
  3. * $Id: k3bvcdjob.h 619556 2007-01-03 17:38:12Z trueg $
  4. * Copyright (C) 2003-2004 Christian Kvasny <chris@k3b.org>
  5. *
  6. * This file is part of the K3b project.
  7. * Copyright (C) 1998-2007 Sebastian Trueg <trueg@k3b.org>
  8. *
  9. * This program is free software; you can redistribute it and/or modify
  10. * it under the terms of the GNU General Public License as published by
  11. * the Free Software Foundation; either version 2 of the License, or
  12. * (at your option) any later version.
  13. * See the file "COPYING" for the exact licensing terms.
  14. */
  15.  
  16. #ifndef K3BVCDJOB_H
  17. #define K3BVCDJOB_H
  18.  
  19. #include <k3bjob.h>
  20.  
  21. class K3bVcdDoc;
  22. class K3bVcdTrack;
  23. class QString;
  24. class K3bProcess;
  25. class KProcess;
  26. class QDataStream;
  27. class K3bAbstractWriter;
  28. class K3bDevice::Device;
  29.  
  30.  
  31. class K3bVcdJob : public K3bBurnJob
  32. {
  33.         Q_OBJECT
  34.  
  35.     public:
  36.         K3bVcdJob( K3bVcdDoc*, K3bJobHandler*, QObject* parent = 0, const char* name = 0 );
  37.         ~K3bVcdJob();
  38.  
  39.         K3bDoc* doc() const;
  40.         K3bVcdDoc* vcdDoc() const
  41.         {
  42.             return m_doc;
  43.         }
  44.         K3bDevice::Device* writer() const;
  45.  
  46.         QString jobDescription() const;
  47.         QString jobDetails() const;
  48.  
  49.     public slots:
  50.         void start();
  51.         void cancel();
  52.  
  53.     private slots:
  54.         void cancelAll();
  55.  
  56.     protected slots:
  57.         void slotVcdxBuildFinished();
  58.         void slotParseVcdxBuildOutput( KProcess*, char* output, int len );
  59.  
  60.         void slotWriterJobPercent( int p );
  61.         void slotProcessedSize( int cs, int ts );
  62.         void slotWriterNextTrack( int t, int tt );
  63.         void slotWriterJobFinished( bool success );
  64.  
  65.  
  66.     private:
  67.         bool prepareWriterJob();
  68.  
  69.         void xmlGen();
  70.         void vcdxBuild();
  71.         void parseInformation( const QString& );
  72.         void startWriterjob();
  73.  
  74.         int m_copies;
  75.         int m_finishedCopies;
  76.  
  77.         unsigned long m_blocksToCopy;
  78.         unsigned long m_bytesFinishedTracks;
  79.         unsigned long m_bytesFinished;
  80.  
  81.         enum { stageUnknown, stageScan, stageWrite, _stage_max };
  82.  
  83.         K3bVcdDoc* m_doc;
  84.         K3bDevice::Device* m_writer;
  85.         K3bDevice::Device* m_reader;
  86.         K3bVcdTrack* m_currentWrittenTrack;
  87.  
  88.         int m_speed;
  89.         int m_stage;
  90.         int m_currentcopy;
  91.         int m_currentWrittenTrackNumber;
  92.  
  93.         double m_createimageonlypercent;
  94.  
  95.         bool firstTrack;
  96.         bool m_burnProof;
  97.         bool m_keepImage;
  98.         bool m_onlyCreateImage;
  99.         bool m_onTheFly;
  100.         bool m_dummy;
  101.         bool m_fastToc;
  102.         bool m_readRaw;
  103.         bool m_imageFinished;
  104.         bool m_canceled;
  105.  
  106.         QString m_tempPath;
  107.         QString m_cueFile;
  108.         QString m_xmlFile;
  109.         QString m_collectedOutput;
  110.  
  111.         K3bAbstractWriter* m_writerJob;
  112.         K3bProcess* m_process;
  113. };
  114.  
  115. #endif
  116.